package com.claimSettlement.controller;

import com.claimSettlement.pojo.RiskType;
import com.claimSettlement.service.RiskTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/risk")
public class RiskTypeController {
    @Autowired
    RiskTypeService service;
    @RequestMapping("/getRiskTypeAll")
    public List<RiskType> getRiskTypeAll(){
        return service.getRiskTypeAll();
    }

    @RequestMapping("/getRiskTypeBycaseId")
    public List<Integer> getRiskTypeBycaseId(String caseId,String type){
        return service.getRiskTypeBycaseId(caseId, type);
    }
}
